package com.odobenus.sample;

import java.sql.SQLException;

import javax.sql.DataSource;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.odobenus.client.anno.EanbleOdobenusClient;

@SpringBootApplication
@EanbleOdobenusClient
@EnableScheduling
@MapperScan("com.odobenus.sample.mapper")
public class OdobenusSampleApp {

	public static void main(String[] args) throws SQLException {
		SpringApplication springApplication = new SpringApplication(OdobenusSampleApp.class);
		ConfigurableApplicationContext ac = springApplication.run(args);
		//DataSource ds = ac.getBean(DataSource.class);
		System.out.println(ac.getEnvironment().getProperty("spring.datasource.url"));
		//System.out.println(ds.getConnection());
	}
}
